package com.service;

import com.dao.ArticleDao;
import com.domain.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author cyt
 * @date 2020/9/19
 */
@Service
public class ArticleServiceImpl implements ArticleService{

    @Autowired
    private ArticleDao articleDao;

//    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public void insert(Article article) {
        articleDao.insert(article);

//        int a = 1 / 0;
    }
}
